	j        main
	.file	"a.c"
	.option nopic
	.text
	.align	1
	.globl	Write
	.type	Write, @function
Write:
	addi	sp,sp,-32
	sw	s0,28(sp)
	addi	s0,sp,32
	sw	a0,-20(s0)
	sw	a1,-24(s0)
	
 	lw      a5,-20(s0)
        	mv      a0, a5
     	 li      a7, 4
       	 ecall
 		
	nop
	lw	s0,28(sp)
	addi	sp,sp,32
	jr	ra
	.size	Write, .-Write
	.align	1
	.globl	Vsprintf
	.type	Vsprintf, @function
	
Exit:
	 li	a1,0
 	li	a2,0
 	li	a3,0
 	li	a4,0
 	li	a5,0
 	li	a7,93
 	ecall
 	jr 	ra
Vsprintf:
	addi	sp,sp,-560
	sw	s0,556(sp)
	addi	s0,sp,560
	sw	a0,-548(s0)
	sw	a1,-552(s0)
	sw	a2,-556(s0)
	lw	a5,-556(s0)
	sw	a5,-24(s0)
	lw	a5,-548(s0)
	sw	a5,-20(s0)
	j	.L3
.L10:
	lw	a5,-552(s0)
	lbu	a4,0(a5)
	li	a5,37
	beq	a4,a5,.L4
	lw	a5,-20(s0)
	addi	a4,a5,1
	sw	a4,-20(s0)
	lw	a4,-552(s0)
	lbu	a4,0(a4)
	sb	a4,0(a5)
	j	.L5
.L4:
	lw	a5,-552(s0)
	addi	a5,a5,1
	sw	a5,-552(s0)
	lw	a5,-552(s0)
	lbu	a4,0(a5)
	li	a5,100
	bne	a4,a5,.L5
	lw	a5,-24(s0)
	lw	a5,0(a5)
	sw	a5,-28(s0)
	sw	zero,-32(s0)
	j	.L6
.L7:
	lw	a4,-28(s0)
	li	a5,10
	rem	a5,a4,a5
	andi	a4,a5,0xff
	lw	a5,-32(s0)
	addi	a3,a5,1
	sw	a3,-32(s0)
	addi	a4,a4,48
	andi	a4,a4,0xff
	addi	a3,s0,-16
	add	a5,a3,a5
	sb	a4,-528(a5)
	lw	a4,-28(s0)
	li	a5,10
	div	a5,a4,a5
	sw	a5,-28(s0)
.L6:
	lw	a5,-28(s0)
	bnez	a5,.L7
	lw	a5,-32(s0)
	addi	a4,s0,-16
	add	a5,a4,a5
	sb	zero,-528(a5)
	j	.L8
.L9:
	lw	a5,-32(s0)
	addi	a4,a5,-1
	lw	a5,-20(s0)
	addi	a3,a5,1
	sw	a3,-20(s0)
	addi	a3,s0,-16
	add	a4,a3,a4
	lbu	a4,-528(a4)
	sb	a4,0(a5)
	lw	a5,-32(s0)
	addi	a5,a5,-1
	sw	a5,-32(s0)
.L8:
	lw	a5,-32(s0)
	bgtz	a5,.L9
	lw	a5,-24(s0)
	addi	a5,a5,4
	sw	a5,-24(s0)
.L5:
	lw	a5,-552(s0)
	addi	a5,a5,1
	sw	a5,-552(s0)
.L3:
	lw	a5,-552(s0)
	lbu	a5,0(a5)
	bnez	a5,.L10
	lw	a5,-20(s0)
	sb	zero,0(a5)
	lw	a4,-20(s0)
	lw	a5,-548(s0)
	sub	a5,a4,a5
	mv	a0,a5
	lw	s0,556(sp)
	addi	sp,sp,560
	jr	ra
	.size	Vsprintf, .-Vsprintf
	.align	1
	.globl	Printf
	.type	Printf, @function
Printf:
        addi    sp,sp,-336
        sw      ra,300(sp)
        sw      s0,296(sp)
        addi    s0,sp,304
        sw      a0,-292(s0)
        sw      a1,4(s0)
        sw      a2,8(s0)
        sw      a3,12(s0)
        sw      a4,16(s0)
        sw      a5,20(s0)
        sw      a6,24(s0)
        sw      a7,28(s0)
        addi    a5,s0,4
        sw      a5,-20(s0)
        addi    a5,s0,-280
        lw      a2,-20(s0)
        lw      a1,-292(s0)
        mv      a0,a5
        call    Vsprintf
        sw      a0,-24(s0)
        addi    a5,s0,-280
        mv      a0,a5
        call    Write
        lw      a5,-24(s0)
        mv      a0,a5
        lw      ra,300(sp)
        lw      s0,296(sp)
        addi    sp,sp,336
        jr      ra
	.size	Printf, .-Printf
	.section	.rodata
	.align	2
.LC0:
	.string	"The thirtieth item is:%d"
	.text
	.align	1
	.globl	main
	.type	main, @function
main:
	addi	sp,sp,-32
	sw	ra,28(sp)
	sw	s0,24(sp)
	addi	s0,sp,32
	li	a5,1
	sw	a5,-24(s0)
	li	a5,1
	sw	a5,-28(s0)
	li	a5,3
	sw	a5,-20(s0)
	j	.L15
.L16:
	lw	a4,-24(s0)
	lw	a5,-28(s0)
	add	a5,a4,a5
	sw	a5,-24(s0)
	lw	a5,-24(s0)
	sw	a5,-32(s0)
	lw	a5,-28(s0)
	sw	a5,-24(s0)
	lw	a5,-32(s0)
	sw	a5,-28(s0)
	lw	a5,-20(s0)
	addi	a5,a5,1
	sw	a5,-20(s0)
.L15:
	lw	a4,-20(s0)
	li	a5, 30
	ble	a4,a5,.L16
	lw	a2,-24(s0)
	lw	a1,-28(s0)
	lui	a5,%hi(.LC0)
	addi	a0,a5,%lo(.LC0)
	call	Printf
	li	a5,0
	mv	a0,a5
	lw	ra,28(sp)
	lw	s0,24(sp)
	addi	sp,sp,32
	call    Exit
	ret
	.size	main, .-main
	.ident	"GCC: (GNU MCU Eclipse RISC-V Embedded GCC, 64-bit) 8.2.0"
